USE [comesencasa]
GO

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[Refentidad44]') AND parent_object_id = OBJECT_ID(N'[dbo].[restaurante]'))
ALTER TABLE [dbo].[restaurante] DROP CONSTRAINT [Refentidad44]
GO

/****** Object:  Index [Ref3244]    Script Date: 12/28/2013 16:56:03 ******/
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[restaurante]') AND name = N'Ref3244')
DROP INDEX [Ref3244] ON [dbo].[restaurante] WITH ( ONLINE = OFF )
GO


ALTER TABLE restaurante
DROP COLUMN entidad_id
GO

DELETE 
FROM restaurante

ALTER TABLE restaurante
ADD Nombre varchar(200) NOT NULL

ALTER TABLE restaurante
ADD Descripcion varchar(2000) NOT NULL

ALTER TABLE restaurante
ADD Rating int NOT NULL


ALTER TABLE restaurante
ADD TiempoEstimadoMinimoId int NULL


ALTER TABLE restaurante
ADD Direccion varchar(300) NOT NULL

ALTER TABLE restaurante
ADD Telefono1 varchar(16) NOT NULL

ALTER TABLE restaurante
ADD Telefono2 varchar(16) NOT NULL

